package PRQuadtree;

import java.io.FileWriter;
import java.io.IOException;

public class Test {


	public static void main(String[] args){

		PrQuadTree<Point> tree= new PrQuadTree<Point>(0, 127, 0, 127);

		boolean duplicateExists = false;
		tree.insert(new Point(40, 45), "A");
		tree.insert(new Point(15, 70), "B");
		//tree.insert(new Point(15, 70), "B");
		tree.insert(new Point(70, 10), "C");
		tree.insert(new Point(69, 50), "D");
		tree.insert(new Point(55, 80), "E");
		tree.insert(new Point(80, 90), "F");
		//tree.delete(new Point(40,45) );
		tree.delete(new Point(70,10) );




		try {
			FileWriter terminal = new FileWriter("test.txt");

			terminal.write("The following points were searched for: \n");
			//terminal.write(tree.find(new Point(40, 45)).toString());
			terminal.write(" Removed: key = 69, 50. Value = "+tree.delete(new Point(691, 50)).toString());
			//terminal.write(tree.find(new Point(100, 100)).toString());


			terminal.close();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
